<?php
if (isset($_POST['fdes'])){
    $openid=trim(addslashes($_POST['fdes'])); 
	include_once("../c/config.php");
	$mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
	$sql="select nianji from idcheck where openid='".$openid."' limit 0, 1";
	$query=$mysqli->query($sql);
	$isHas=false;
	$nianji='';
    if($query->num_rows>0){
        $data=$query->fetch_assoc();
        $nianji=$data['nianji'];
        $isHas=true;
    }
    if ($isHas && !empty($nianji)){
        echo json_encode(array('s'=>'ok','n'=>$nianji));
    }else{
        echo json_encode(array('s'=>'not'));
    }
    $mysqli->close();
}else{
    echo json_encode(array('s'=>'not'));
}
?>